﻿namespace ciji.Core
{
    public abstract class EntityBaseId
    {
        /// <summary>
        /// 雪花Id
        /// </summary>
        [SugarColumn(ColumnDescription = "Id", IsPrimaryKey = true, IsIdentity = true)]
        public virtual long Id { get; set; }

        [SugarColumn(IsIgnore = true)]//需要加上
        public int RowIndex { get; set; } 

    }

    public abstract class DEntityBase : EntityBaseId
    {
        /// <summary>
        /// gid
        /// </summary>
        [SugarColumn(ColumnDescription = "gid", IsOnlyIgnoreUpdate = true)]
        public virtual string Gid { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true)]
        public virtual DateTime? sys_CreateDate { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [SugarColumn(ColumnDescription = "更新时间")]
        public virtual DateTime? sys_ModifyDate { get; set; }

        /// <summary>
        /// 创建者Id
        /// </summary>
        [SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true)]
        public virtual string sys_Creater { get; set; }

        /// <summary>
        /// 创建者名称
        /// </summary>
        [SugarColumn(ColumnDescription = "创建者名称", IsOnlyIgnoreUpdate = true)]
        public virtual string sys_CreaterName { get; set; }

        /// <summary>
        /// 修改者Id
        /// </summary>
        [SugarColumn(ColumnDescription = "修改者Id")]
        public virtual string sys_Modifier { get; set; }

        /// <summary>
        /// 修改者名称
        /// </summary>
        [SugarColumn(ColumnDescription = "修改者名称")]
        [MaxLength(50)]
        public virtual string sys_ModifierName { get; set; }

        /// <summary>
        /// 软删除
        /// </summary>
        [SugarColumn(ColumnDescription = "软删除" )]
        public virtual int sys_IsDelete { get; set; } = 0;
    }
    public abstract class DEntityCreate : EntityBaseId
    {
        /// <summary>
        /// gid
        /// </summary>
        [SugarColumn(ColumnDescription = "gid", IsOnlyIgnoreUpdate = true)]
        public virtual string Gid { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true)]
        public virtual DateTime? sys_CreateDate { get; set; }

        /// <summary>
        /// 创建者Id
        /// </summary>
        [SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true)]
        public virtual string sys_Creater { get; set; }

        /// <summary>
        /// 创建者名称
        /// </summary>
        [SugarColumn(ColumnDescription = "创建者名称", IsOnlyIgnoreUpdate = true)]
        public virtual string sys_CreaterName { get; set; }

    }

    public abstract class DEntityCreateDel : EntityBaseId
    {
        /// <summary>
        /// gid
        /// </summary>
        [SugarColumn(ColumnDescription = "gid", IsOnlyIgnoreUpdate = true)]
        public virtual string Gid { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true)]
        public virtual DateTime? sys_CreateDate { get; set; } 

        /// <summary>
        /// 创建者Id
        /// </summary>
        [SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true)]
        public virtual string sys_Creater { get; set; }

        /// <summary>
        /// 创建者名称
        /// </summary>
        [SugarColumn(ColumnDescription = "创建者名称", IsOnlyIgnoreUpdate = true)]
        public virtual string sys_CreaterName { get; set; }
        /// <summary>
        /// 软删除
        /// </summary>
        [SugarColumn(ColumnDescription = "软删除")]
        public virtual int sys_IsDelete { get; set; } = 0;

    }
}